//package com.itheima.web.old;
///**
// * Create By Awen on 2021/8/22
// *
// * @author Awen
// */
//
//import com.itheima.pojo.PageBean;
//import com.itheima.pojo.Result;
//import com.itheima.pojo.Student;
//import com.itheima.service.StudentService;
//import com.itheima.web.BaseController;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@WebServlet("/selectByPageServlet")
//public class SelectByPageServlet extends HttpServlet {
//
//    @Override
//    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        int currentPage = 1;
//        int pageSize = 3;
//        try {
//            currentPage = Integer.parseInt(request.getParameter("currentPage"));
//            pageSize = Integer.parseInt(request.getParameter("pageSize"));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        StudentService studentService = new StudentService();
//        PageBean<Student> pb = studentService.queryStudentsByPage(currentPage,pageSize);
//        System.out.println(pb);
//
//        Result result = new Result(true, "", pb);
//        BaseController.responseJson(response,result);
//
//    }
//
//    @Override
//    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        doGet(request, response);
//    }
//}
